The present invention relates to a DMA data transfer apparatus used in a computer system, a motion picture decoding apparatus using the same, and a DMA data transfer control method.
In recent years, with the advance in computer technology, various multimedia personal computers have been developed. A personal computer of this type can reproduce not only text data and graphics data but also motion picture data and audio data.
Generally, motion picture data is compressed and encoded in accordance with the MPEG 1, and stored in a CD (Compact Disk) or the like. The motion picture data is decoded, displayed, and reproduced using a dedicated expansion board. As an expansion board for decoding, displaying, and reproducing motion picture data, e.g., "REAL Magic" available from Sigma Designs, Inc., U.S.A. is well known. This "REAL Magic" has a video decode function complying with the MPEG 1 standard. The decoded motion picture data is synthesized with VGA graphics received from a video card via a feature connector, and the synthesized motion picture is displayed.
The MPEG 1 standard, however, assumes the use of a CD having a data transfer rate of about 1.5 Mbps. Processing motion picture data containing a large amount of image data such as a movie leads to a degradation in image quality, and the like.
Recently, a DVD (Digital Versatile Disk) has been developed as a new-generation storage medium having a data transfer rate about several to several ten times higher than that of the CD. The DVD has a new video disk standard capable of recording video data such as a movie with a high image quality on an optical disk having the same size as that of the CD by using motion picture coding called the MPEG 2. A recording/reproducing method for the DVD is based on variable rate coding in order to ensure both the image quality and the recording time with respect to the capacity. The amount of variable-rate encoded data depends on the quality of an original image. A more abruptly changing scene requires a larger data amount.
When video data stored in the DVD is to be reproduced on a personal computer, the data must be read from a DVD-ROM in the main memory of the computer, and transferred to a DVD decoder. In this case, the data is normally transferred from the main memory to the DVD decoder using a DMA (Direct Memory Access) data transfer scheme in order to reduce the load of the CPU.
DMA data transfer starts when the start memory address of a data area subjected to data transfer, and a transfer counter value indicating the data size of the area are set in a DMA controller, and then the DMA controller is instructed to start DMA data transfer. Completion of the DMA data transfer is recognized based on a hardware interrupt to the CPU, a change in state of the DMA controller, or the like. In successively performing DMA data transfer of another areas of the main memory, after completion of the first DMA data transfer is detected, the start memory address of a data area subjected to next data transfer, and a transfer counter value indicating the data size of the area must be set again in the DMA controller, and the DMA controller must be instructed to start DMA data transfer. FIG. 1 shows the procedure of this DMA transfer.
As is apparent from FIG. 1, when DMA data transfer of a plurality of areas is successively performed, an idle time is necessarily generated between completion of one DMA data transfer and start of next DMA data transfer. In FIG. 1, a time interval between timings (3) and (4) is an idle time. This idle time is a time required for the CPU to recognize completion of DMA transfer and set the start memory address and transfer counter value of the next data area in the DMA controller again after the DMA data transfer is completed.
The length of the idle time is not constant but varies depending on a hardware interrupt state or the load of the CPU at that time. Depending on the length of the idle time, originally intended data processing may not be correctly performed. For example, when data requiring a high transfer rate such as the above-mentioned MPEG 2 motion picture data is to be transferred to the DVD decoder, the data transfer to the DVD decoder is interrupted. Interruption of the data transfer leads to distortion of a reproduced image or frame omission. Further, decoding itself cannot be continuously performed.
As described above, if successive DMA data transfer is performed by the conventional DMA data transfer scheme, an idle time is generated between completion of DMA data transfer and start of next DMA data transfer. For this reason, if data requiring a high transfer rate such as MPEG 2 motion picture data stored in the DVD is to be transferred by the conventional DMA data transfer scheme, the data transfer to the DVD decoder is interrupted. Interruption of the data transfer results in distortion of a reproduced image or frame omission. Further, decoding itself cannot be continuously performed.